function openpopup(url,width,height)
{
	var newwindow;
	var left=(screen.width-width)/2;
	var top=(screen.height-height)/2;
	var size="width=".concat(width,",","height=",height,",","left=",left,",","top=",top);
	newwindow=window.open(url,'new',size);
	
	/*jQuery("#weddingdress").imageMagnify({ //apply effect to image with ID="myimage"
		 magnifyby:5
		})*/
}
function afterSubmit(form)
{
	document.form.submit();
}
function afterupdate()
{
	window.opener.location.reload();
	window.close();
}
function checkAll()
{
	if($('input[name=chkall]').is(":checked"))
	{
		$('input[name="chkid[]"]').attr('checked',true);
	}
	else
		$('input[name="chkid[]"]').attr('checked',false);
}
function submitDelForm(action)
{
	if (confirm("Do you want to delete selected items ?")==true)
	{
		$("form[name=formIndex]").attr("action",action+"/delete");
		//alert(test);
		$("form[name=formIndex]").submit();
	}
}
function deleteOneItem(action,id)
{
	if(confirm("Do you want to delete item ?")==true)
		{
			$('#hidID').val(id);
			$("form[name=formIndex]").attr("action",action+"/delete");
			$("form[name=formIndex]").submit();
		}
}